package main

import "fmt"

func main() {
	a := 10
	var ip *int
	fmt.Printf("address of a %x\n", &a)
	ip = &a
	fmt.Println("ip 变量存储的指针地址:", ip)
	fmt.Println("ip 变量存储的指针地址的值:", *ip)
	fmt.Println("ip 变量存储的指针地址的地址:", &ip)
	var ptr *int
	switch {
	case ptr != nil:
		fmt.Println("ptr is not empty point")
		fallthrough
	case ptr == nil:
		fmt.Println("ptr is empty point")
		fallthrough
	case ip != nil:
		fmt.Println("ip is not empty point")
	case ip == nil:
		fmt.Println("ip is empty point")

	}
}
